package com.ss.android.k.a;

import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;

import com.ss.android.article.browser.R;
import com.ss.android.k.aa;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

public abstract class a extends BaseAdapter implements b {
    public final List b;

    public a() {

        this.b = new ArrayList();
    }

    public abstract com.ss.android.k.aa a(int arg1, ViewGroup arg2);

    public void a(int arg2, com.ss.android.k.aa arg3) {
        arg3.a(this.getItem(arg2));
    }

    public final void a(List arg2) {
        this.b.clear();
        this.b.addAll(((Collection)arg2));
        this.notifyDataSetChanged();
    }

    public int getCount() {
        return this.b.size();
    }

    public Object getItem(int arg2) {
        return this.b.get(arg2);
    }

    public long getItemId(int arg3) {
        return ((long)arg3);
    }

    public View getView(int arg4, View arg5, ViewGroup arg6) {
        com.ss.android.k.aa v0_1;
        int v2 = R.id.bn;
        if(arg5 == null) {
            v0_1 = this.a(arg4, arg6);
            v0_1.a.setTag(v2, v0_1);
        }
        else {
            v0_1 = (aa) arg5.getTag(v2);
        }

        this.a(arg4, ((com.ss.android.k.aa)v0_1));
        return ((com.ss.android.k.aa)v0_1).a;
    }
}

